package com.baozun.houji.order.adapter

import com.baozhun.mall.common.base.BaseListAdapter
import com.baozun.houji.order.R
import com.baozun.houji.order.databinding.ItemRefundPicBinding
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder

/**
 * @Title：订单退款图片适配器
 * @Description：
 * @Author：xing.luo
 * @Since：2022/11/21
 * @Version：1.0.0
 */
class RefundPicAdapter(data: MutableList<String>) :
    BaseListAdapter<String, ItemRefundPicBinding>(
        R.layout.item_refund_pic, data
    ) {

    override fun convert(holder: BaseDataBindingHolder<ItemRefundPicBinding>, item: String) {
        super.convert(holder, item)
        holder.dataBinding?.picUlr = item
        holder.dataBinding?.showCloseBt = data.indexOf(item) != 0
        holder.dataBinding?.executePendingBindings()
    }
}